﻿<local:DocumentBase x:Class="WPFExcelReport.ITXABPLAN"
                        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                        xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                        xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                        xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                         xmlns:db="clr-namespace:INTEX.DataBase"
                         Height="700" Width="1024" 
                        Loaded="Window_Loaded" 
                        FontSize="16" 
                        Background="White" 
                        HorizontalAlignment="Stretch"
                        Margin="0,0,0,0" 
                        VerticalAlignment="Stretch"
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="SetProd" />
        <db:SETINTEXDB  x:Key="SetEnv" />        
        <CollectionViewSource   x:Key="vwWDECK" Source="{Binding Path=WDECK,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwVKPOS" Source="{Binding Path=VKPOS,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwVKKOPF" Source="{Binding Path=VKKOPF,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwWASTAMM" Source="{Binding Path=WASTAMM,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwWAFARBEN" Source="{Binding Path=WAFARBEN,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwBSSATZ" Source="{Binding Path=BSSATZ,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwBHSATZ" Source="{Binding Path=BHSATZ,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwBSFARB" Source="{Binding Path=BSFARB,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwWTGEW" Source="{Binding Path=WTGEW,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwWASTKE" Source="{Binding Path=WASTKE,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwBASTKE" Source="{Binding Path=BASTKE,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwWASTPASS" Source="{Binding Path=WASTPASS,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwWABIND" Source="{Binding Path=WABIND,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwWTEINZ" Source="{Binding Path=WTEINZ,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwWTPASS" Source="{Binding Path=WTPASS,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwWTSCHUSS" Source="{Binding Path=WTSCHUSS,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwWADART" Source="{Binding Path=WADART,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwBASTGA" Source="{Binding Path=BASTGA,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwWASTGA" Source="{Binding Path=WASTGA,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwABPOS" Source="{Binding Path=ABPOS,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwABAUFM" Source="{Binding Path=ABAUFM,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwGAAUF" Source="{Binding Path=GAAUF,Source={StaticResource SetData}}" />
    </local:DocumentBase.Resources>
    <Grid   DataContext="" Width="1200" Margin="10,10,0,0" VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition   Height="Auto" />
            <RowDefinition   Height="Auto" />
            <RowDefinition  Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition  Width="300" />
            <ColumnDefinition Width="300" />
            <ColumnDefinition   Width="300" />
            <ColumnDefinition Width="300" />
        </Grid.ColumnDefinitions>
        <StackPanel   Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3">
            <Expander  Header="查询条件"  Name="expQueryCond" ExpandDirection="Down" IsExpanded="True">
                <StackPanel  >
                    <Expander Name="expLog" ExpandDirection="Left" IsExpanded="True">
                        <WrapPanel Name="zoneCommand" Height="34" Margin="0,0,0,6">
                            <Label   Content="系统" Width="40" Margin="0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                            <TextBox   Name="txtMANDANT" MaxLength="2" Width="40" Margin="10,0,0,0" Text="00" HorizontalAlignment="Left" Background="Pink" FontSize="18" />
                            <Label  Content="语言" Width="40" Margin="0,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                            <TextBox   IsReadOnly="True" Name="txtSPRACHKZ" Width="40" Margin="0,0,0,0" Text="" MaxLength="1" HorizontalAlignment="Left" Background="Pink" FontSize="18" />
                            <Label  Content="用户名" Width="60" Margin="10,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                            <TextBox  Name="txtUserID" Width="80" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Yellow" FontSize="18" MaxLength="8" AcceptsTab="True" CharacterCasing="Upper" KeyboardNavigation.TabIndex="0" />
                            <Label Content="密码" Width="40" Margin="10,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                            <PasswordBox  Name="txtPassword" Width="80" Margin="10,0,0,0" HorizontalAlignment="Left" Background="Yellow" FontSize="18" KeyboardNavigation.TabIndex="1" />
                            <Button  Height="Auto" Margin="10,0,0,0" Name="btnLogIn" Width="34" Click="btnLogIn_Click" KeyboardNavigation.TabIndex="2" IsDefault="True">
                                <Button.Background>
                                    <ImageBrush ImageSource="Image/User.png" />
                                </Button.Background>
                            </Button> 
                            <TextBlock  Name="txtLogIn" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" Background="White" FontSize="14" KeyboardNavigation.TabIndex="1" />
                        </WrapPanel>
                    </Expander>                    
                    <WrapPanel >
                        <ComboBox
                    Name="cbWTYE"
                    HorizontalAlignment="Left"
                    IsEditable="True"
                    Background="White"
                    IsTextSearchEnabled="True"
                    IsTextSearchCaseSensitive="False"                           
                    Width="120" 
                    >
                            <ComboBoxItem Content="生产单"/>
                            <ComboBoxItem Content="销售单"/>
                        </ComboBox>
                        <TextBlock Width="Auto">订单号:</TextBlock>
                        <TextBox   Name="txtVKPAUFKRS" MaxLength="2" Width="40" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink"  CharacterCasing="Upper"/>
                        <TextBox   Name="txtVKPAUFLFD" MaxLength="6" Width="80" Margin="0,0,0,0"   HorizontalAlignment="Left" KeyUp="txtVKPAUFLFD_KeyUp"/>
                        <TextBox  Name="txtVKPAUFPOS" Width="60" Margin="0,0,0,0" Text="{Binding Path=VKPAUFPOS, Source={StaticResource ResourceKey=vwVKPOS}}" HorizontalAlignment="Left" Background="Yellow" KeyboardNavigation.TabIndex="0" />
                        <TextBlock Width="Auto">数量:</TextBlock>
                        <TextBlock Name="txtVKPMENGE1" Margin="10,0,0,0" Width="Auto" MinWidth="80" Background="Gray" Text="{Binding Path=VKPMENGE1, Source={StaticResource ResourceKey=vwVKPOS}, Converter={StaticResource ResourceKey=d100}}"></TextBlock>
                        <TextBlock Width="Auto">单位:</TextBlock>
                        <TextBlock Name="txtVKPMEEH" Margin="10,0,0,0" Width="Auto" Text="{Binding Path=VKPMEEH, Source={StaticResource ResourceKey=vwVKPOS}}"></TextBlock>
                        <TextBlock Width="Auto">交期:</TextBlock>
                        <TextBlock Name="txtVKPLIEFTERM" Margin="10,0,0,0" Width="Auto" MinWidth="80" Background="Gray" Text="{Binding Path=VKPLIEFTERM, Source={StaticResource ResourceKey=vwVKPOS}}"></TextBlock>
                    </WrapPanel>
                    <WrapPanel>
                        <Button  Height="30"  Width="30" Margin="10,0,0,0" Name="btnGetVKKOPF" Click="btnQuery_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                            <Button.Background>
                                <ImageBrush ImageSource="Image/Search.png" />
                            </Button.Background>
                        </Button>
                        <Button  Height="30"  Width="30" Margin="10,0,0,0"   IsEnabled="True" Click="btnRefresh_Click">
                            <Button.Background>
                                <ImageBrush ImageSource="Image/Reload.png" />
                            </Button.Background>
                        </Button>
                        <StackPanel>
                            <Button  Height="30"  Width="30" Margin="10,0,0,0"   Click="btnAddCompare_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                            <Button.Background>
                                <ImageBrush ImageSource="Image/Add.png" />
                            </Button.Background>
                        </Button>
                            <TextBlock>增加比较</TextBlock>
                            </StackPanel>
                        <StackPanel>
                            <Button  Height="30"  Width="30" Margin="10,0,0,0"  Click="btnClear_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                                <Button.Background>
                                    <ImageBrush ImageSource="Image/Delete.png" />
                                </Button.Background>
                            </Button>
                            <TextBlock>清理环境</TextBlock>
                        </StackPanel>
                        <StackPanel>
                      
                        <Button  Height="30"  Width="30" Margin="10,0,0,0"  Click="btnDeleteABON_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                            <Button.Background>
                                <ImageBrush ImageSource="Image/Delete.png" />
                            </Button.Background>
                        </Button>
                            <TextBlock>删除网络</TextBlock>
                        </StackPanel>
                        <StackPanel>                            
                        <Button  Height="30"  Width="30" Margin="10,0,0,0"  Click="btnDeleteAB_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                            <Button.Background>
                                <ImageBrush ImageSource="Image/Delete.png" />
                            </Button.Background>
                        </Button>
                            <TextBlock>删除订单</TextBlock>
                            </StackPanel>
                        <StackPanel>
                            <Button  Height="30"  Width="30" Margin="10,0,0,0"  Click="btnPrint_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                                <Button.Background>
                                    <ImageBrush ImageSource="Image/Print.png" />
                                </Button.Background>
                            </Button>
                            <TextBlock>打印</TextBlock>
                        </StackPanel>
                    </WrapPanel>
                    <WrapPanel>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="客户号:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBlock Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" 
                                                                 Text="{Binding Path=VKKKUNDNR, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="120" />
                            </Grid>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="发货条件:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBlock Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Text="{Binding Path=VKKLIEFBED, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="60" />
                            </Grid>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="运输方式:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Text="{Binding Path=VKKVERSART, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="60" />
                            </Grid>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="销售合同:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Text="{Binding Path=VKKBESTNR, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="120" />
                            </Grid>
                        </WrapPanel> 
                    <DataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3"
                              AutoGenerateColumns="True"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwABPOS}}"  
                              HeadersVisibility="Column"
                              x:Name="dgVKPOS"    
                              Width="Auto"
                              Height="Auto"
                              MaxHeight="150"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              > 
                    </DataGrid>
                      <DataGrid 
                        AutoGenerateColumns="True" EnableRowVirtualization="True"  
                            ItemsSource="{Binding Path=vwBAAUF}"  
                            HeadersVisibility="Column" 
                            CanUserReorderColumns="True"  
                            CanUserResizeRows="True"
                            CanUserSortColumns="True" 
                            RowDetailsVisibilityMode="VisibleWhenSelected"   
                            Width="Auto"
                            Height="Auto"
                            EnableColumnVirtualization="True"  
                            ScrollViewer.HorizontalScrollBarVisibility="Auto"
                            ScrollViewer.VerticalScrollBarVisibility="Auto" 
                            > 
                        </DataGrid>
                    <DataGrid Grid.Row="1"  Grid.Column="0"  
                                                  AutoGenerateColumns="True" EnableRowVirtualization="True"
                                                  HeadersVisibility="Column" 
                                                  FontSize="12" 
                                                  ItemsSource="{Binding Source={StaticResource ResourceKey=vwWDECK}}"    
                                                  Width="1024"
                                                  Height="Auto" 
                                                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                                  ScrollViewer.VerticalScrollBarVisibility="Auto" 
                                                  > 
                                        </DataGrid>
                    <DataGrid Grid.Row="1"  Grid.Column="1"  
                                                   FontSize="12" ItemsSource="{Binding Source={StaticResource ResourceKey=vwABAUFM}}"    
                                                  AutoGenerateColumns="True" EnableRowVirtualization="True"
                                                  HeadersVisibility="Column" CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True" 
                                                  Width="1024" Height="Auto" EnableColumnVirtualization="True" HorizontalAlignment="Left">
                                        </DataGrid>
                    <DataGrid Grid.Row="1"  Grid.Column="0"  
                                                  AutoGenerateColumns="True" EnableRowVirtualization="True"
                                                  HeadersVisibility="Column" 
                                                  FontSize="12" 
                                                  ItemsSource="{Binding Source={StaticResource ResourceKey=vwGAAUF}}"    
                                                  Width="1024"
                                                  Height="Auto" 
                                                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                                  ScrollViewer.VerticalScrollBarVisibility="Auto" 
                                                  >
                    </DataGrid>
                </StackPanel>
            </Expander>
        </StackPanel> 
    </Grid>
</local:DocumentBase>